package com.iuhao.web.core.utils;

import java.util.Date;

public abstract class LStringUtils {
    private LStringUtils() {
    }

     public static boolean isEmpty(String value) {
        int strLen;
        if(value != null && (strLen = value.length()) != 0) {
            for(int i = 0; i < strLen; ++i) {
                if(!Character.isWhitespace(value.charAt(i))) {
                    return false;
                }
            }

            return true;
        } else {
            return true;
        }
    }

    public static boolean areNotEmpty(String... values) {
        boolean result = true;
        if(values != null && values.length != 0) {
            for (String value : values) {
                result &= !isEmpty(value);
            }
        } else {
            result = false;
        }
        return result;
    }

    public static String getUnixTimestamp() {
            return String.valueOf(new Date().getTime()/1000);
        }

}